﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace AGrandVenture
{
    class ArmorItem : InventoryItem
    {
        #region Declarations
        private double armorClass = 0;

        private ArmorTypes armorType;


        public enum ArmorTypes
        {
            Shield,
            HeadArmor, ChestArmor, ArmArmor, HandArmor, WaistArmor,
            LegArmor, FeetArmor,
            Earring, Ring, NeckItem
        }

        #endregion

        #region Properties

        public ArmorTypes ArmorType
        {
            get { return armorType; }
        }
        public double BaseAC
        {
            get { return armorClass; }
            set { armorClass = value; }
        }

        public double TotalAc
        {
            get { return armorClass+BonusAC; }
        }

        #endregion

        #region Constructor
        public ArmorItem(UInt64 seedValue)
        {
            Seed = seedValue;
            string itemName = "";
            int level = SeedUtility.getSeedLevel(seedValue);
            Level = level;
            Type = ItemType.Armor;
            Texture2D texture = Game1.equipmentSheet;
            Rectangle initialFrame = new Rectangle(48, 0, 48, 48);
            float scale = 1f;

            string prefix = DataManager.GreyItemPrefix[SeedUtility.getSeedPair(4, 5, seedValue) % (DataManager.GreyItemPrefix.Count - 1)];
            string suffix = DataManager.GreyItemSuffix[SeedUtility.getSeedPair(6, 7, seedValue) % (DataManager.GreyItemSuffix.Count - 1)];

            armorType = (ArmorTypes)(SeedUtility.getSeedPair(8, 9, seedValue) % (Enum.GetValues(typeof(ArmorTypes)).Length - 1));

            switch (armorType) 
            {
                case ArmorTypes.Shield:
                    texture = Game1.equipmentSheet;
                    itemName = DataManager.ShieldNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.ShieldNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 48);
                    scale = .6f;
                    break;
                case ArmorTypes.HeadArmor:
                    texture = Game1.equipmentSheet;
                    initialFrame = new Rectangle(96, 0, 48, 48);
                    itemName = DataManager.HeadArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.HeadArmorNames.Count - 1)];
                    scale = .4f;
                    break;
                case ArmorTypes.ChestArmor:
                    texture = Game1.equipmentSheet;
                    itemName = DataManager.ChestArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.ChestArmorNames.Count - 1)];
                    initialFrame = new Rectangle(144, 0, 48, 48);
                    scale = .5f;
                    break;
                case ArmorTypes.ArmArmor:
                    texture = Game1.lootSheet;
                    itemName = DataManager.ArmArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.ArmArmorNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
                case ArmorTypes.HandArmor:
                    texture = Game1.lootSheet;
                    itemName = DataManager.HandArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.HandArmorNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
                case ArmorTypes.WaistArmor:
                    texture = Game1.lootSheet;
                    itemName = DataManager.WaistArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.WaistArmorNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
                case ArmorTypes.LegArmor:
                    texture = Game1.lootSheet;
                    itemName = DataManager.LegArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.LegArmorNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
                case ArmorTypes.FeetArmor:
                    texture = Game1.equipmentSheet;
                    itemName = DataManager.FeetArmorNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.FeetArmorNames.Count - 1)];
                    initialFrame = new Rectangle(192, 0, 48, 48);
                    scale = .4f;
                    break;
                case ArmorTypes.Earring:
                    texture = Game1.lootSheet;
                    itemName = DataManager.EarringNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.EarringNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
                case ArmorTypes.Ring:
                    texture = Game1.lootSheet;
                    itemName = "Ring";
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
                case ArmorTypes.NeckItem:
                    texture = Game1.lootSheet;
                    itemName = DataManager.NeckpieceNames[SeedUtility.getSeedPair(10,11, seedValue) % (DataManager.NeckpieceNames.Count - 1)];
                    initialFrame = new Rectangle(48, 0, 48, 26);
                    break;
            }

            Base = new Sprite(
                Vector2.Zero,
                texture,
                initialFrame,
                Vector2.Zero,
                0.1f);

            Base.Scale = scale;

            Name = prefix + " " + itemName + " of " + suffix;
            setBaseStatsByName(armorType, itemName, level);

            if (Rarity == ItemRarity.Trash)
            {
                clearBonusStats();//Gray items don't get innate item-type stats, just Base stats and name bonuses
                setBonusesByGrayPrefix(prefix, level);
                setBonusesByGraySuffix(suffix, level);
            }
            else if (Rarity == ItemRarity.Common)
            {
                //Common items get the same bonuses as Gray items, but they keep their innate item-type bonuses
                setBonusesByGrayPrefix(prefix, level);
                setBonusesByGraySuffix(suffix, level);
            }
        }
        #endregion

        private void setBaseStatsByName(ArmorTypes type, string name, int level)
        {
            double lvlMod = 1 + (double)(level / 99);

            switch (type)
            {
                case (ArmorTypes.Shield):
                    EquipSlot = InventoryItem.EquipmentSlot.Offhand;
                    Type = InventoryItem.ItemType.Shield;
                    switch(name)
                    {
                        case "Shield":
                            BaseAC = 5*lvlMod;
                            BonusHP = 1*lvlMod;
                            break;
                        case "Buckler":
                            BaseAC = 3*lvlMod;
                            BonusHP += 5*lvlMod;
                            break;
                        case "Kite Shield":
                            BaseAC = 7*lvlMod;
                            BonusHP += 10*lvlMod;
                            break;
                    } break;
                case (ArmorTypes.HeadArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Head;
                    switch(name)
                    {
                        case "Helm":
                            BaseAC = 8*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusIntelligence += 1*lvlMod;
                            }else{
                                BonusStrength += 1*lvlMod;
                            } break;
                        case "Bonnet":
                            BaseAC = 2*lvlMod;
                            BonusCharisma += 2*lvlMod;
                            BonusEnergy += 5*lvlMod;
                            break;
                        case "Hat":
                            BaseAC = 3*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusAgility += 2*lvlMod;
                            }else {
                                BonusIntelligence += 2*lvlMod;
                                BonusLuck += 3*lvlMod;
                            }break;
                        case "Visor":
                            BaseAC = 4*lvlMod;
                            BonusStrength += 2*lvlMod;
                            BonusRange += 0.2*lvlMod;
                            break;
                        case "Helmet":
                            BaseAC = 5*lvlMod;
                            BonusFireResistance += 3*lvlMod;
                            BonusMentalResistance += 3*lvlMod;
                            BonusArcaneResistance += 5*lvlMod;
                            break;
                    } break;
                case (ArmorTypes.ChestArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Chest;
                    switch(name)
                    {
                        case "Breastplate":
                            BaseAC = 15*lvlMod;
                            BonusConstitution += 2*lvlMod;
                            BonusStrength += 10*lvlMod;
                            BonusHP += 10*lvlMod;
                            BonusFireResistance -= 5 * lvlMod;
                            BonusColdResistance -= 5 * lvlMod;
                            break;
                        case "Tunic":
                            BaseAC = 10*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusAgility += 5*lvlMod;
                                BonusPoisonResistance += 5 *lvlMod;
                            }else {
                                BonusIntelligence += 3*lvlMod;
                                BonusEnergy += 5*lvlMod;
                                BonusFireResistance += 5*lvlMod;
                                BonusColdResistance += 10*lvlMod;
                            }break;
                        case "Robe":
                            BaseAC = 8*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusIntelligence += 5*lvlMod;
                                BonusColdResistance += 5*lvlMod;
                                BonusPoisonResistance += 5*lvlMod;
                            }else{
                                BonusAgility += 2*lvlMod;
                                BonusAttackSpeed += 2*lvlMod;
                                BonusColdResistance += 5*lvlMod;
                                BonusPoisonResistance += 5*lvlMod;
                            }break;
                        case "Dress":
                            BaseAC = 5*lvlMod;
                            BonusCharisma += 3*lvlMod;
                            BonusIntelligence += 3*lvlMod;
                            BonusFireResistance -= 3*lvlMod;
                            BonusColdResistance -= 3*lvlMod;
                            BonusPoisonResistance += 5*lvlMod;
                            break;
                        case "Vest":
                            BaseAC = 5*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusAgility += 3*lvlMod;
                                BonusRange += 0.5*lvlMod;
                            } else {
                                BonusIntelligence += 5*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusMagicalAttack += 3*lvlMod;
                            }break;
                        case "Shirt":
                            BaseAC = 2*lvlMod;
                            BonusCharisma += 3*lvlMod;
                            BonusIntelligence += 1*lvlMod;
                            BonusAgility += 1*lvlMod;
                            BonusPoisonResistance += 5*lvlMod;
                            break;
                        case "Chiton":
                            BaseAC = 12*lvlMod;
                            BonusCharisma += 3*lvlMod;
                            BonusHP += 5*lvlMod;
                            BonusStrength +=5*lvlMod;
                            BonusFireResistance += 5*lvlMod;
                            BonusColdResistance += 2*lvlMod;
                            BonusMentalResistance -= 3*lvlMod;
                            break;
                        case "Jacket":
                            BaseAC = 4*lvlMod;
                            BonusLuck += 2*lvlMod;
                            BonusEnergy +=10*lvlMod;
                            BonusColdResistance += 3*lvlMod;
                            BonusPhysicalAttack += 3*lvlMod;
                            break;
                        case "Frock":
                            BaseAC = 3*lvlMod;
                            BonusCharisma += 3*lvlMod;
                            BonusEnergy += 5*lvlMod;
                            BonusAgility += 3*lvlMod;
                            break;
                        case "Night Gown":
                            BaseAC = 2*lvlMod;
                            BonusCharisma += 5*lvlMod;
                            BonusAgility +=5*lvlMod;
                            BonusFireResistance -= 3*lvlMod;
                            BonusColdResistance -= 3*lvlMod;
                            break;
                        case "Gi":
                            BaseAC = 4*lvlMod;
                            BonusAttackSpeed += 1.5*lvlMod;
                            BonusAgility += 5*lvlMod;
                            BonusStrength +=1 *lvlMod;
                            BonusPhysicalAttack += 3*lvlMod;
                            break;
                    } break;
                case (ArmorTypes.ArmArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Arms;
                    switch(name)
                    {
                        case "Sleeves":
                            BaseAC = 6*lvlMod;
                            BonusAgility += 3*lvlMod;
                            BonusCharisma +=3*lvlMod;
                            BonusIntelligence += 3*lvlMod;
                            BonusFireResistance -= 2*lvlMod;
                            break;
                        case "Armplates":
                            BaseAC = 9*lvlMod;
                            BonusAgility -= 2*lvlMod;
                            BonusStrength += 3*lvlMod;
                            break;
                        case "Bracelets":
                            BaseAC = 2*lvlMod;
                            BonusIntelligence += 5*lvlMod;
                            BonusCharisma += 3*lvlMod;
                            BonusEnergy += 5*lvlMod;
                            BonusFireResistance += 3*lvlMod;
                            BonusPoisonResistance -= 2*lvlMod;
                            BonusColdResistance -=2*lvlMod;
                            break;
                        case "Armbands":
                            BaseAC = 4*lvlMod;
                            BonusAgility += 4*lvlMod;
                            BonusHP +=5*lvlMod;
                            BonusFireResistance +=3*lvlMod;
                            BonusColdResistance += 3*lvlMod;
                            break;
                        case "Manacles":
                            BaseAC = 5*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusCharisma -= 5*lvlMod;
                                BonusStrength += 5*lvlMod;
                                BonusHP += 10*lvlMod;
                                BonusEnergy += 5*lvlMod;
                                BonusCriticalStrike += 2*lvlMod;
                                BonusFireResistance -= 3*lvlMod;
                            }else{
                                BonusCharisma -= 5*lvlMod;
                                BonusIntelligence +=5*lvlMod;
                                BonusHP += 5*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusFireResistance -= 3*lvlMod;
                            }break;
                    } break;
                case (ArmorTypes.HandArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Hands;
                    switch(name)
                    {
                        case "Gloves":
                            BaseAC = 4*lvlMod;
                            if (DiceRoll.D2 == 0){
                                BonusAgility += 3*lvlMod;
                                BonusCriticalStrike += 1*lvlMod;
                            }else{
                                BonusIntelligence += 3*lvlMod;
                                BonusCriticalStrike += 1*lvlMod;
                            }break;
                        case "Gauntlets":
                            BaseAC = 6*lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusStrength += 5*lvlMod;
                                BonusIntelligence += 2*lvlMod;
                                BonusFireResistance -= 2*lvlMod;
                                BonusColdResistance -= 2*lvlMod;
                            }else{
                                BonusStrength += 4*lvlMod;
                                BonusCriticalStrike += 1*lvlMod;
                                BonusFireResistance -= 2*lvlMod;
                                BonusColdResistance -= 2*lvlMod;
                            }break;
                        case "Mittens":
                            BaseAC = 2*lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma +=5 *lvlMod;
                                BonusHP += 5*lvlMod;
                                BonusLuck += 3*lvlMod;
                                BonusColdResistance += 5*lvlMod;
                                BonusFireResistance -= 3*lvlMod;
                            } else {
                                BonusIntelligence += 3*lvlMod;
                                BonusEnergy += 5*lvlMod;
                                BonusColdResistance += 5*lvlMod;
                                BonusFireResistance -= 3*lvlMod;
                            }break;
                    } break;
                case (ArmorTypes.WaistArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Waist;
                    switch(name)
                    {
                        case "Belt":
                            BaseAC = 5 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusAgility += 3*lvlMod;
                                BonusConstitution += 1*lvlMod;
                                BonusEnergy += 5*lvlMod;
                            } else {
                                BonusIntelligence += 3*lvlMod;
                                BonusConstitution += 3*lvlMod;
                                BonusHP += 5*lvlMod;
                            }break;
                        case "Sash":
                            BaseAC = 2 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusAgility += 3*lvlMod;
                                BonusHP += 5*lvlMod;
                                BonusEnergy += 5*lvlMod;
                            } else {
                                BonusIntelligence += 5*lvlMod;
                                BonusCharisma += 3*lvlMod;
                                BonusEnergy += 3*lvlMod;
                            }
                            break;
                        case "Cord":
                            BaseAC = 1 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusAgility += 5*lvlMod;
                                BonusHP += 10*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            } else {
                                BonusIntelligence += 10*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusArcaneResistance += 5*lvlMod;
                            }break;
                        case "Girdle":
                            BaseAC = 8 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusAgility -= 3*lvlMod;
                                BonusStrength += 3*lvlMod;
                                BonusHP += 15*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            } else {
                                BonusAgility -= 3*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusStrength += 5*lvlMod;
                            }break;
                        case "Ribbon":
                            BaseAC = 1 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 8*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusHP += 15*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            } else {
                                BonusAgility += 8*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            }break;
                        case "Obi":
                            BaseAC = 2 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusAgility += 5*lvlMod;
                                BonusStrength += 3*lvlMod;
                                BonusAttackSpeed += 1*lvlMod;
                                BonusHP += 10*lvlMod;
                            } else {
                                BonusAgility += 5*lvlMod;
                                BonusCriticalStrike += 1*lvlMod;
                                BonusPhysicalAttack += 1*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            }break;
                        case "Braid":
                            BaseAC = 2 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusIntelligence += 5*lvlMod;
                                BonusCharisma += 5*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusHP += 10*lvlMod;
                            } else {
                                BonusAgility += 5*lvlMod;
                                BonusColdResistance += 5*lvlMod;
                                BonusFireResistance += 5*lvlMod;
                                BonusMentalResistance += 10*lvlMod;
                            }break;
                        case "Cable":
                            BaseAC = 4 * lvlMod;
                            BonusStrength += 8*lvlMod;
                            BonusHP += 20*lvlMod;
                            BonusMaxDmg += 1*lvlMod;
                            break;
                    } break;
                case (ArmorTypes.LegArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Legs;
                    switch(name)
                    {
                        case "Leggings":
                            BaseAC = 6 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusIntelligence += 5*lvlMod;
                                BonusCharisma += 3*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusHP += 5*lvlMod;
                            } else {
                                BonusAgility += 5*lvlMod;
                                BonusColdResistance += 5*lvlMod;
                                BonusFireResistance += 5*lvlMod;
                                BonusMentalResistance += 5*lvlMod;
                            }break;
                        case "Pants":
                            BaseAC = 3 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusIntelligence += 5*lvlMod;
                                BonusCharisma += 5*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusHP += 5*lvlMod;
                            } else {
                                BonusAgility += 5*lvlMod;
                                BonusConstitution += 3*lvlMod;
                                BonusStrength += 3*lvlMod;
                            }break;
                        case "Trousers":
                            BaseAC = 4 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusIntelligence += 3*lvlMod;
                                BonusCharisma += 2*lvlMod;
                                BonusEnergy += 10*lvlMod;
                                BonusHP += 5*lvlMod;
                            } else {
                                BonusAgility += 5*lvlMod;
                                BonusConstitution += 3*lvlMod;
                                BonusStrength += 3*lvlMod;
                            }break;
                        case "Knickers":
                            BaseAC = 1 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 6*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusHP += 20*lvlMod;
                                BonusEnergy += 5*lvlMod;
                            } else {
                                BonusAgility += 3*lvlMod;
                                BonusAttackSpeed += 1*lvlMod;
                            }break;
                        case "Skirt":
                            BaseAC = 2 *lvlMod;
                            BonusCharisma += 8*lvlMod;
                            BonusIntelligence += 3*lvlMod;
                            BonusConstitution += 5*lvlMod;
                            break;
                        case "Kilt":
                            BaseAC = 3 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 2*lvlMod;
                                BonusIntelligence += 2*lvlMod;
                                BonusHP += 10*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            } else {
                                BonusAgility += 4*lvlMod;
                                BonusAttackSpeed += 1.5*lvlMod;
                                BonusCriticalStrike += 1.5*lvlMod;
                            }break;
                        case "Underpants":
                            BaseAC = 0 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 5*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusHP += 5*lvlMod;
                                BonusEnergy += 20*lvlMod;
                                BonusColdResistance -= 3*lvlMod;
                            } else {
                                BonusAgility += 4*lvlMod;
                                BonusColdResistance -= 3*lvlMod;
                                BonusCriticalStrike += 1*lvlMod;
                            }break;
                        case "Bloomers":
                            BaseAC = 2 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 7*lvlMod;
                                BonusLuck += 3*lvlMod;
                                BonusIntelligence += 2*lvlMod;
                                BonusHP += 10*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            } else {
                                BonusLuck += 3*lvlMod;
                                BonusCriticalStrike += 1.5*lvlMod;
                                BonusAgility += 3*lvlMod;
                                BonusColdResistance -= 3*lvlMod;
                            }break;
                        case "Britches":
                            BaseAC = 3 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusConstitution += 5*lvlMod;
                                BonusStrength += 3*lvlMod;
                                BonusAgility += 2*lvlMod;
                                BonusHP += 10*lvlMod;
                            } else {
                                BonusConstitution += 5*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusEnergy += 10*lvlMod;
                            }break;
                        case "Pantaloons":
                            BaseAC = 4 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 5*lvlMod;
                                BonusArcaneResistance += 5*lvlMod;
                                BonusIntelligence += 5*lvlMod;
                            } else {
                                BonusCharisma += 3*lvlMod;
                                BonusAgility += 5*lvlMod;
                                BonusAttackSpeed += 1*lvlMod;
                            }break;
                        case "Overalls":
                            BaseAC = 4*lvlMod;
                            BonusCharisma += 1*lvlMod;
                            BonusConstitution += 5*lvlMod;
                            BonusPoisonResistance += 5* lvlMod;
                            BonusStrength += 3*lvlMod;
                            break;
                        case "Shorts":
                            BaseAC = 3 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusCharisma += 2*lvlMod;
                                BonusIntelligence += 3*lvlMod;
                                BonusColdResistance -= 3 *lvlMod;
                            } else {
                                BonusCharisma += 1*lvlMod;
                                BonusAgility += 3*lvlMod;
                                BonusCriticalStrike += 3*lvlMod;
                                BonusColdResistance -= 3 *lvlMod;
                            }break;
                    } break;
                case (ArmorTypes.FeetArmor):
                    EquipSlot = InventoryItem.EquipmentSlot.Feet;
                    switch(name)
                    {
                        case "Boots":
                            BaseAC = 5 *lvlMod;
                            if (DiceRoll.D2 == 0) {
                                BonusIntelligence += 5*lvlMod;
                                BonusColdResistance += 3 *lvlMod;
                                BonusFireResistance += 3 * lvlMod;
                                BonusPoisonResistance += 3 * lvlMod;
                            } else {
                                BonusStrength += 5*lvlMod;
                                BonusColdResistance += 3 * lvlMod;
                                BonusFireResistance += 3 * lvlMod;
                                BonusPoisonResistance += 3 * lvlMod;
                            }break;
                        case "Bunny Slippers":
                            BaseAC = 2 * lvlMod;
                            BonusCharisma += 5 * lvlMod;
                            BonusIntelligence += 3 * lvlMod;
                            BonusMentalResistance += 5 * lvlMod;
                            break;
                        case "Sandals":
                            BaseAC = 1 * lvlMod;
                            BonusAgility += 3 * lvlMod;
                            BonusPoisonResistance -= 3 * lvlMod;
                            BonusMentalResistance += 3 * lvlMod;
                            break;
                        case "Flip-Flops":
                            BaseAC = 1 * lvlMod;
                            BonusCharisma += 2 * lvlMod;
                            BonusIntelligence += 2 * lvlMod;
                            break;
                        case "Galoshes":
                            BaseAC = 3 * lvlMod;
                            BonusPoisonResistance += 10 * lvlMod;
                            BonusStrength += 3 * lvlMod;
                            BonusLuck += 2 * lvlMod;
                            break;
                        case "Mukluks":
                            BaseAC = 4 * lvlMod;
                            BonusColdResistance += 10 * lvlMod;
                            BonusStrength += 2 * lvlMod;
                            BonusAgility += 2 * lvlMod;
                            BonusLuck += 2 * lvlMod;
                            BonusFireResistance -= 2 * lvlMod;
                            break;
                        case "Waders":
                            BaseAC = 3 * lvlMod;
                            BonusCharisma += 3 * lvlMod;
                            BonusIntelligence += 3 * lvlMod;
                            BonusPoisonResistance += 5 * lvlMod;
                            BonusHP += 5 * lvlMod;
                            break;
                        case "Laced Boots":
                            BaseAC = 3 * lvlMod;
                            if (DiceRoll.D2 == 0)
                            {
                                BonusCharisma += 8 * lvlMod;
                                BonusIntelligence += 3 * lvlMod;
                                BonusEnergy += 10 * lvlMod;
                            }
                            else
                            {
                                BonusAgility += 6 * lvlMod;
                                BonusStrength += 3 * lvlMod;
                                BonusCriticalStrike += 1 * lvlMod;
                                BonusHP += 5 * lvlMod;
                            }break;
                    } break;
            }
        }
    }
}
